home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / programm.ing / falcon / nt_dsp1.lzh / NT_DSP1.MSA / CODEC / LOGLINT.ASM < prev    next >
Encoding:
Assembly Source File  |  1989-01-24  |  2.2 KB  |  69 lines

  1. ;
  2. ; This program originally available on the Motorola DSP bulletin board.
  3. ; It is provided under a DISCLAMER OF WARRANTY available from
  4. ; Motorola DSP Operation, 6501 Wm. Cannon Drive W., Austin, Tx., 78735.
  5. ; Companded CODEC to/from Linear Data Conversion Test Program
  6. ; Last Update 20 Apr 87   Version 1.0
  7. ;
  8.     page        132
  9. loglint ident   1,0
  10. ;
  11. ; CODEC to DSP56001 interface program used to test LOGLIN and LINLOG
  12. ; macros on the DSP56001 Application Development System (ADS) hardware.
  13. ; The SSI interface is used for analog I/O with a mu-law formatted Motorola
  14. ; MC14402 CODEC.  Bit sync and frame sync clocks are generated by the SSI
  15. ; internal clock generator.
  16. ;
  17. ; Latest Revision - April 20, 1987
  18. ; Tested and verified - April 20, 1987
  19. ;
  20.         opt     mex
  21.         nolist
  22.         include 'dsplib:ioequ'
  23.         include 'dsplib:loglin'
  24.         include 'dsplib:linlog'
  25.         list
  26. ;
  27. ; Cold start (reset)
  28. ;
  29.         org     p:0
  30.         jmp     <start
  31. ;
  32. ; Initialize peripherals
  33. ;
  34.         org     p:$100
  35. start   movep   #0,x:M_BCR              ;set for zero wait state memory
  36.         or      #$4,omr                 ;enable mu/a-law lookup table
  37.         movep   #0,x:M_PCC              ;reset SSI and Port C pins
  38.         movep   #$000127,x:M_CRA        ;init SSI for 128.125 KHz continuous
  39.                                         ; clock (PSR=0,PM=40-1), 8.008 KHz
  40.         movep   #$003230,x:M_CRB        ; word length frame sync (WL=8 bits,
  41.                                         ; DC=2-1) using a 20.5 MHz DSP clock.
  42.         movep   #$1e0,x:M_PCC           ;init PC5-PC8 as SSI pins
  43. ;
  44. ; Receive SSI data
  45. ;
  46. datain  jclr    #M_RDF,x:M_SR,datain    ;loop until receive data available
  47.         movep   x:M_RX,a1               ;read SSI receive data register
  48. ;
  49. ; Convert mu-law data to linear fraction
  50. ;
  51.         mulin
  52. ;
  53. ; Insert digital signal processing here
  54. ;
  55.         nop
  56. ;
  57. ; Convert linear fraction to mu-law data
  58. ;
  59.         linmu
  60. ;
  61. ; Transmit SSI data
  62. ;
  63. dataout jclr    #M_TDE,x:M_SR,dataout   ;loop until transmit ready
  64.         movep   a1,x:M_TX               ;write SSI transmit data register
  65.         jmp     <datain                 ;do it again
  66.         end     start
  67.